local sk__huomo = fk.CreateSkill {

  name = "sk__huomo",

  tags = {},

}



sk__huomo:addEffect("viewas", {
  name = "sk__huomo",
  pattern = ".|.|.|.|.|basic",
  prompt = "#sk__huomo",
  interaction = function(self, player)
    local all_names = Fk:getAllCardNames("b")
    local names = player.getViewAsCardNames(player, sk__huomo.name, all_names, {}, player:getTableMark("sk__huomo-turn"))
    if #names > 0 then
      return UI.CardNameBox { choices = names, all_choices = all_names }
    end
  end,
  card_filter = function(self, player, to_select, selected)
    return #selected == 0 and Fk:getCardById(to_select).color == Card.Black
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 or not self.interaction.data then return end
    local card = Fk:cloneCard(self.interaction.data)
    card:addSubcards(cards)
    card.skillName = sk__huomo.name
    return card
  end,
  before_use = function(self, player, use)
    local mark = player:getTableMark("sk__huomo-turn")
    table.insert(mark, Fk:cloneCard(self.interaction.data).trueName)
    player.room:setPlayerMark(player, "sk__huomo-turn", mark)
  end,
  enabled_at_play = Util.TrueFunc,
  enabled_at_response = function(self, player, response)
    return not response
  end,
})

return sk__huomo
